<!doctype html>
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>rock game</title>


  <script>
    var lg = lg || {};
    var createjs = lg;
  </script>
<script src="../res/gameConfig.js"></script>
<script src="../res/TweenMax.min.js"></script>
<!--<script src="../res/system.js"></script>-->
<script src="../res/create.js"></script>
<script src="../res/app.js"></script>
<!--<script src="config.js"></script>-->
<style type="text/css">
  *{
    margin: 0;
    padding: 0;
  }
  </style>
</head>
<body onload="init();" style="background:#125d8e">
<!-- this will be our entry component for the application -->
<app></app>

<canvas id="canvasElement" onclick="clickHandler()" width="750" height="1334"></canvas>
<script>
    function clickHandler() {

      if (game.isDebug) setScore();

    }
    var game;
    function init() {
      game=new App();
         gameInit();
        //  setInterval(
        //  setScore,200)
    }
    function gameInit() {
      game.isDebug = true;//可以点击游戏加分,测试用,改为false就不行了
    }
    //接口
    function setScore(v=1) {
      for(var i=0;i<v;i++)
      {
        game.setScore();
      }
      
    }
    function changeScore(v)
    {
      game.changeScore(v)
    }
    //音乐按钮
    function musicHandler()
    {
      alert("我按了音乐")
    }
     //音乐按钮
    function arrivedMusic()
    {
      //alert("星球抵达")
    }
    var o = document.getElementById("canvasElement");
    perX = document.body.clientWidth / o.width;
    perY = document.body.scrollHeight / o.height;
    o.style.width = o.width * perX + "px";
    o.style.height = o.height * perY + "px";

    function backBtnHandler() {
      console.log("点击返回")
    }

</script>
<button onclick="setScore(5)">加分</button>
<button onclick="changeScore(5)">加分(不影响火箭)</button>
</body>

</html>